package edu.zime.iot.service;

import edu.zime.iot.dao.CourseMapper;
import edu.zime.iot.entity.Course;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class CourseService
{
    @Autowired
    private CourseMapper courseDao;

    public List<Course> getAllCourses(){return courseDao.getAll();}
    public int add(Course course){return courseDao.addCourse(course);}
    public int update(Course course){return courseDao.updateCourse(course);}
    public int deleteById(int id){return courseDao.deleteCourseById(id);}
    public Course getById(int id){return courseDao.getCourseById(id);}
}
